﻿namespace KinonekoSoftware.Studio.Pages.Storyboards
{
    public class StoryboardEditorViewModel : TabViewModelCore
    {
        private IStory _Notion;
        
        
        public StoryboardEditorViewModel()
        {
            Removable        = true;
            EnableSafetyExit = true;
        }

        protected override void OnReceive(PageContext context)
        {
            if (context.Has(ContextBase.Key_Value))
            {
                _Notion = context.GetObject<IStory>(ContextBase.Key_Value);
                
                //
                //
                SetTitle(_Notion.Name);
            }
            
            
            base.OnReceive(context);
        }

        public void SetTitle(string title)
        {
            Title = $"剧情: {title}";
        }
    }
}